
<%@ include file="/common/taglibs.jsp"%>
<!--分页查询共用的页面-->
<%@ include file="/common/common.jsp"%>
<%@ page language="java" pageEncoding="UTF-8"%>

<script type="text/javascript" src="<%=jsPath%>/jquery/jquery.timers.js"></script><!--定时器-->
<script>
    deleteEntity = function(actionUrl, EntityId){

        $.messager.confirm('确认','你确定要删除记录吗?',function(r){
            if (r){
                if(actionUrl.indexOf("?") > 0)
                    actionUrl = actionUrl + "&entityId=" + EntityId;
                else
                    actionUrl = actionUrl + "?entityId=" + EntityId;

                $.getJSON(actionUrl, function(result){
                    if (result.success == true) {
                        $.messager.alert('提示',"删除成功!");
                        window.location.reload();
                    }
                    else
                        $.messager.alert('提示',"无法删除! 错误原因：" + result.message);
                });
            }
        });

    };

			function editVehicleStateIcon(entityId)
			{
				InfoWindow.editVehicleStateIcon(entityId);
			}


$().ready(function() {
	

});
</script>
 <BODY>
				<!--修改和查询的标志-->
  <table width="60%"  class="TableBlock">
					<tbody><tr>
						<td colspan="6" style="font-weight: bold; background: #EFEFEF;" height="25">车辆图标类型列表
						<span style="color:red;background:blue;">${message}</span>
											
						<input type="button" name="btnNew"  id="btnNew" value="新增" class="button blue medium" onclick="editVehicleStateIcon(0);"/>
						</td>
					</tr>
					<tr class="TableHeader">
                          <TD>车辆类型</TD>
                          <TD>状态</TD>
                          <TD>图标</TD>
						  <TD>编辑</TD>	
						  <TD>删除</TD>			
					</tr>

                     <c:forEach items="${vehicleStateIcons}" var="vehicleStateIcon" >
					<tr>
					  <td >
						  ${vehicleStateIcon.vehicleType}
						</td>
						<td >
						  ${vehicleStateIcon.vehicleStatus}
						</td>
						<td >
						  <img src="<%=ApplicationPath%>/map/vehicleIcon/${vehicleStateIcon.icon}" id="icon" />
						</td>
										
						<td><a href="javascript:InfoWindow.editVehicleStateIcon('${vehicleStateIcon.entityId}');">编辑</td>
						<td>
						  <image src="<%=ApplicationPath%>/image/cross.gif" style="cursor:hand" 
						  onclick="deleteEntity('delete.action',${vehicleStateIcon.entityId});"></image>
						</td>
						
					</tr>
					 </c:forEach>

				
					
				</tbody></table>
 </BODY>
</HTML>
